namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// A specialized store implementation that provides for grouping records by one of the available fields. This
	/// is usually used in conjunction with an {@link Ext.grid.GroupingView} to provide the data model for
	/// a grouped GridPanel.
	///
	/// Internally, GroupingStore is simply a normal Store with multi sorting enabled from the start. The grouping field
	/// and direction are always injected as the first sorter pair. GroupingView picks up on the configured groupField and
	/// builds grid rows appropriately.
	/// </summary>
	/// <definedin>src\data\GroupingStore.js</definedin>
	[ScriptName("GroupingStore")]
	[ScriptNamespace("Ext.data")]
	[Imported()]
	public partial class GroupingStore : ext.data.Store
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">
		/// A config object containing the objects needed for the Store to access data,
		/// and read the data into Records.
		/// </param>
		public GroupingStore(ext.data.GroupingStore_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public GroupingStore()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>Fired whenever a call to store.groupBy successfully changes the grouping on the store</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("groupchangeEventName")]
		public const string GroupchangeEventName = "groupchange";
		
		/// <summary>The field name by which to sort the store&apos;s data (defaults to &apos;&apos;).</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("groupField")]
		public string GroupField;
		
		/// <summary>
		/// True if the grouping should apply on the server side, false if it is local only (defaults to false). If the
		/// grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a
		/// helper, automatically sending the grouping field name as the &apos;groupBy&apos; param with each XHR call.
		/// </summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("remoteGroup")]
		public bool RemoteGroup;
		
		/// <summary>
		/// True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the
		/// existing sort info (defaults to false).
		/// </summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("groupOnSort")]
		public bool GroupOnSort;
		
		/// <summary>The direction to sort the groups. Defaults to &apos;ASC&apos;.</summary>
		/// <htmlSummary>The direction to sort the groups. Defaults to &lt;tt&gt;&apos;ASC&apos;&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("groupDir")]
		public string GroupDir;
		#endregion
		
		#region Methods
		/// <summary>Clears any existing grouping and refreshes the data using the default sort.</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("clearGrouping")]
		public void ClearGrouping()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Groups the data by the specified field.</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		/// <param name="field">The field name by which to sort the store&apos;s data</param>
		/// <param name="forceRegroup">
		/// True to force the group to be refreshed even if the field passed
		/// in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)
		/// </param>
		[ScriptName("groupBy")]
		public void GroupBy(string field, bool forceRegroup)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Groups the data by the specified field.</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		/// <param name="field">The field name by which to sort the store&apos;s data</param>
		[ScriptName("groupBy")]
		public void GroupBy(string field)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fired whenever a call to store.groupBy successfully changes the grouping on the store</summary>
		/// <definedin>src\data\GroupingStore.js</definedin>
		[ScriptName("groupchange")]
		public event ext.auto.Delegate_ext_data_GroupingStore_And_System_String Groupchange;
		#endregion
	}
}
